# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0802-04.py
    ======================
    @descript: 查找
    @copyright:nnz
    @author:dln
    @date: 2021/8/2 20:12
    @version:v1.0
'''
#容器自带类型
v_tuple01=(1,2,3,4)
print('元素个数为：',len(v_tuple01))
print('最大值为：',max(v_tuple01))
print('最小值为',min(v_tuple01))
v_tuple02=6
if v_tuple02 in v_tuple01:
    print('该元素在容器里{}'.format(v_tuple02))
else:
    print('该元素不在容器里{}'.format(v_tuple02))
    pass
print('*'*60)
#切片
v_tuple03=(1,2,3,4,5,6)
#获取元素5
print('获取到的该元素为：',v_tuple03[4])
print('获取到的该元素为：',v_tuple03[-2])
#获取元素2-4
print('获取到的该元素为：',v_tuple03[1:4])
print('获取到的该元素为：',v_tuple03[-5:-2])
#tuple自带的类型
v_tuple04=(1,2,3,4,5,6,7)
v_tuple05=1
if v_tuple04.count(v_tuple05)!=0:
    print('{}在该元素中'.format(v_tuple05))
else:
    print('{}不在该元素中'.format(v_tuple05))
    pass



